Ext.namespace('Ext.ux.tree');

/**
 * 创建树形面板
 * 
 * 使用方法：
 * var nav = new Ext.ux.tree.CompUrlTree({
 * 	dataUrl:WEB_CONTEXT + '/system/menuTree',
 * 	region:'west',
 * 	contentEl:'west'
 * });
 * 
 */
Ext.ux.tree.CompUrlTree = Ext.extend(Ext.tree.TreePanel, {
	rootId:'root',
	rootText:'',
	title:'树列表',
	split:true,
	width: 200,
	minSize: 175,
	maxSize: 400,
	collapsible: true,
	margins:'0 0 0 0',
	containerScroll: true,
    rootVisible: false,
	initComponent: function(){
		this.root = new Ext.tree.AsyncTreeNode({
			id: this.rootId,
			text: this.rootText,
			draggable: false
    	});
		Ext.ux.tree.CompUrlTree.superclass.initComponent.call(this);
    	this.root.expand(true,true);
	}
});
